
<h2> Les membres du groupes </h2>

<table>
    <thead>
        <tr>
            <td> Member </td>
            <td> Status </td>
            <td> Options </td>
        </tr>
    </thead>
    <tbody>
<?php
foreach ($members as $member){
    ?>
    <tr>
        <td> <?php echo $this->Display->getLink($member['User'], 'User');?></td>
        <td> <?php echo $this->Display->getStatus($member['UserGroup']);?></td>    
        <td><?php
        if ($member['UserGroup']['status'] == 'ask'){
            echo $this->Html->link("Accepter", array('action' => 'accepteUser', $member['UserGroup']['id'], $member['User']['id']));
            echo ' | ';
            echo $this->Html->link("Refuser", array('action' => 'refuseUser', $member['UserGroup']['id'], $member['User']['id']));
        }
        else if ($member['UserGroup']['status'] == 'in'){
            echo $this->Html->link("Supprimer", array('action' => 'ejectUser', $member['UserGroup']['id'], $member['User']['id']));            
        }
        ?>
        </td>
    </tr>
<?php
}
?>
    </tbody>
</table>
